# Simple Grid To Mesh/Matrix Test
#
# $ Makefile    Rev. 0.3.3    2014-05-30T16:47+08:00 $

STDCC= cc
RM= rm -rf

CFLAGS= -O3


DID_LIB=../../didf/src/didf
DID_INC=../../didf/src/didf

EXE_OBJS= sgmt ugmt


build: ${EXE_OBJS}


# Sample Test
sgmt: sgmtest.o pregrid.o trigrid.o sim.o
	${STDCC} -o sgmt sgmtest.o pregrid.o trigrid.o sim.o -lm \
	${DID_LIB}/libdid.a

sgmtest.o: sgmtest.c
	${STDCC} -c sgmtest.c ${CFLAGS} -I./ -I${DID_INC}


# Unstructured Trianglar Grid From File
ugmt: ugmtest.o pregrid.o trigrid.o sim.o
	${STDCC} -o ugmt ugmtest.o pregrid.o trigrid.o sim.o -lm \
	${DID_LIB}/libdid.a


ugmtest.o: ugmtest.c
	${STDCC} -c ugmtest.c ${CFLAGS} -I./ -I${DID_INC}


pregrid.o: pregrid.c
	${STDCC} -c pregrid.c ${CFLAGS} -I./

trigrid.o: trigrid.c
	${STDCC} -c trigrid.c ${CFLAGS} -I./

sim.o: sim.c
	${STDCC} -c sim.c ${CFLAGS} -I./


clean:
	${RM} *.o
	${RM} ${EXE_OBJS}
	${RM} *.core


clean_test:
	${RM} sample*
